import getlink from "@/api/getapi.js"
let homeCloth={
    state:{
        data:""
    },
    // mutations来对state进行修改
    mutations:{
        CLOTHDATA(state,payload){
            state.data = payload
        }
    },
    actions:{
        CLOTH(context){
            getlink("/mock/clothData").then((ok)=>{
                // console.log(ok.data)
                // 触发修改的这个动作   this.$store.commit("你要触发的修改动作名")
                context.commit("CLOTHDATA",ok.data)
            })
        }
    },
}

export default homeCloth